package org.alex.sample.service.Impl;

import java.util.List;

import org.alex.sample.dao.LoginDAO;
import org.alex.sample.model.User;
import org.alex.sample.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {
	
	@Autowired
	private LoginDAO loginDao;

	@Override
	public List<User> findUserByUserName(String userName) throws Exception {
		return loginDao.findUserByUserName(userName);
	}

	@Override
	public void updateUserLoginFailCount(User user) throws Exception {
		loginDao.updateUserLoginFailCount(user);
	}

	@Override
	public void updateUserLastLockTime(User user) throws Exception {
		loginDao.uppdateUserLastLockTime(user);
	}

}
